package com.woopsion.spring;

import com.woopsion.spring.contextSupport.woopsionContextAnnotationIoc;
import com.woopsion.spring.wpcSpringTest.component.Dog;
import com.woopsion.spring.wpcSpringTest.component.SmartAnimalable;
import com.woopsion.spring.wpcSpringTest.woopsionSpringConfig;

/**
 * @author woopsion
 * @date 2025-05-30
 */
@SuppressWarnings("all")
public class AppMain {
    public static void main(String[] args) throws ClassNotFoundException, InstantiationException, IllegalAccessException {
        
        woopsionContextAnnotationIoc ioc = new woopsionContextAnnotationIoc(new woopsionSpringConfig().getClass());
//        Dog dog = (Dog) ioc.getBean("dog");
//        Object dog1 = ioc.getBean("dog");
//        System.out.println(dog);
//        System.out.println(dog1);
//        dog.test();
        
        //aop测试
        SmartAnimalable smartDog = (SmartAnimalable)ioc.getBean("smartDog");
        System.out.println(smartDog.getClass());
        System.out.println(smartDog.getSum(1, 10));
    }
}
